package com.czy.contorller.user;

import com.czy.dto.AssetPageDto;
import com.czy.result.Result;
import com.czy.service.AssetService;
import com.czy.vo.PageVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/user/asset")
public class AssetController {

    @Autowired
    private AssetService assetService;

    //分页查询资产表
    @GetMapping("/list")
    public Result<PageVo> list(AssetPageDto assetPageDto){
        log.info("接收到的资产分页数据：{}" , assetPageDto);
        PageVo pageVO = assetService.list(assetPageDto);
        return Result.success(pageVO);
    }
}
